﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace _210617
{
    public partial class WebForm2 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string nameform = Request.Form["username"];
            string passwordform = Request.Form["password"];

            Response.Write("Request.Form['username']==>" + nameform + "<br/>");
            Response.Write("Request.Form['password']==>" + passwordform + "<br/>");

            string nameparams = Request.Params["username"];
            string passwordparams = Request.Params["password"];

            Response.Write("Request.Paramas['username']==>" + nameparams + "<br/>");
            Response.Write("Request.Paramas['password']==>" + passwordparams + "<br/>");

            if (PreviousPage != null)
            {
                TextBox userbox = (TextBox)PreviousPage.FindControl("username");
                TextBox pwbox = (TextBox)PreviousPage.FindControl("password");
                if (userbox != null)
                {
                    Response.Write("PreviousPage.FindControl('username')==>" + userbox.Text + "<br/>");
                }
                if (pwbox != null)
                {

                    Response.Write("PreviousPage.FindControl('password')==>" + pwbox.Text + "<br/>");
                }
            }

            string nameget = Request.Params["name"];
            string pwget = Request.Params["passwordget"];
            Response.Write("Request.Paramas['name']==>" + nameget + "<br/>");
            Response.Write("Request.Paramas['passwordget']==>" + pwget + "<br/>");

            string namequerystring = Request.QueryString["aname"];
            string pwquerystring = Request.QueryString["apassword"];
            Response.Write("Request.QueryString['aname']==>" + namequerystring + "<br/>");
            Response.Write("Request.QueryString['apassword']==>" + pwquerystring + "<br/>");
        }
    
    }
}